<?php

namespace common\models\active;

use common\models\BaseModel;

/**
 * Desc 优惠券活动模型
 */
class ActiveCouponModel extends BaseModel
{

    //启用
    const STATE_ENABLE = 1;
    //禁用
    const STATE_DISABLE = 2;

    // 状态
    public static $state = [
        self::STATE_ENABLE => '启用',
        self::STATE_DISABLE => '禁用',
    ];

    /** @var int 1 类型: 现金券 */
    const TYPE_CASH = 1;
    /** @var int 2 类型: 折扣券 */
    const TYPE_DISCOUNT = 2;
    // 类型
    public static $type = [
        self::TYPE_CASH => '现金券',
        self::TYPE_DISCOUNT => '折扣券',
    ];


    const STATUS_WAITING = 4; // 未开始
    const STATUS_USABLE = 1; // 可领取
    const STATUS_USED = 2; // 已领过
    const STATUS_NONE = 3; // 已领完

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%active_coupon}}';
    }
}
